/****** Object:  Stored Procedure dbo.spr_InsertDBClientVisa  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_InsertDBClientVisa]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_InsertDBClientVisa]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_InsertDBClientVisa]
 (
	@appdate smalldatetime,
	@appresdate smalldatetime,
	@clientid int,
	@compid int,
	@empextprocessedby smallint,
	@empprocessedby smallint,
	@enteredby smallint,
	@entrydate smalldatetime,
	@extappdate smalldatetime,
	@extendeddays int,
	@extprice decimal(10,
 2),
	@extresdate smalldatetime,
	@fromdate smalldatetime,
	@isapproved bit,
	@isextapproved bit,
	@price decimal(10,
 2),
	@tilldate smalldatetime,
	@visaid int,
	@visaserial varchar(50),
	@visatypeid int
 )
 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	INSERT INTO [ClientVisa]
	(
		[AppDate],
		[AppResDate],
		[ClientId],
		[CompId],
		[EmpExtProcessedBy],
		[EmpProcessedBy],
		[EnteredBy],
		[EntryDate],
		[ExtAppDate],
		[ExtendedDays],
		[ExtPrice],
		[ExtResDate],
		[FromDate],
		[IsApproved],
		[IsExtApproved],
		[Price],
		[TillDate],
		[VisaID],
		[VisaSerial],
		[VisaTypeId]
	)
	VALUES
	(
		@appdate,
		@appresdate,
		@clientid,
		@compid,
		@empextprocessedby,
		@empprocessedby,
		@enteredby,
		@entrydate,
		@extappdate,
		@extendeddays,
		@extprice,
		@extresdate,
		@fromdate,
		@isapproved,
		@isextapproved,
		@price,
		@tilldate,
		@visaid,
		@visaserial,
		@visatypeid
	)

	SET @Err = @@Error
	RETURN @Err
 END

 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

